<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const userMap = new Map();
      userMap
        .set("name", "jack")
        .set("age", 20)
        .set("gender", "boy")
        .set("allow", true);
      // object->array->map
      // map->array->object
      // map->object
      // console.log(Object.fromEntries(Array.from(userMap)));
      console.log(Object.fromEntries(userMap));
      console.log(Array.from(userMap));
    </script>
  </body>
</html>
